[index]
Word Text Chunk
Syntax
word <integer> [to <integer2>]
{of | in} <expression> the <ordinal> word {of | in} <expression>
Description
The word chunk yields a substring of an expression by extracting a specified word or range of words from the expression. Words are delimited by spaces, returns, or tabs; they include all punctuation between these delimiters.
The <expression> can be any valid text string, including a container reference, a property reference, a function that returns text, a literal string, or a combination of these.
Notes
You can specify chunks of chunks as in word 2 of line 3 of field "Inventory"
You can also specify ranges using chunks, as in word 3 to 5 of field "Names"
You can use text chunk expressions with tabular chunk expressions by enclosing the tabular chunk expression within parentheses as in the following example:
put word 1 of (column 1 of pickList 3)
Attention: You can use a combination of text and tabular chunk expressions to retrieve values, but not to insert values into containers.
Examples
The following examples demonstrates various chunk expressions and the values that they return. For the examples, assume these conditions:
put "1 2 3 4 5" into my_variable
put "I like peas, carrots, and broccoli" into field 1
Expression: word 1 of "red green blue" Result: red
Expression: word 2 to 3 in "red, green, blue" Result: green, blue
Expression: word 1 of "red,green,blue" Result: red,green,blue
Expression: char 1 to 3 of word 2 of "red green blue" Result: gre
Expression: word 1 to 4 of my_variable Result: 1 2 3 4
Expression: the last word in field 1 Result: broccoli
Expression: the first word of fld 1
This text has been mechanically extracted from the Oracle Media Objects 1.0.4.9 MediaTalk Reference, © 1995 Oracle Corporation, and is provided here solely for educational/historical purposes.